1. Field of the Invention
The present invention relates to an apparatus which is designed to convert a video signal or the like into a digital signal and perform band compression based on a combination of intra-frame coding and inter-frame coding, and which allows a recording/reproducing device to easily reproduce a good image, especially in the fast reproduction mode, from a signal output from the apparatus to the device and recorded by the device a tape in helical scan scheme. Also does this invention relate to an apparatus which can record signals in a wide band, used for a high-definition TV or the like, for a long period of time.
2. Description of the Related Art
As is generally known, various methods have been studied which achieve the digital transmission of video signals. Among these transmission methods are: a method which uses a variable length coding scheme, and a method in which intra-frame coding and inter-frame coding are performed to effect band compression. The method, wherein intra-frame coding and inter-frame coding are performed to effect band compression, is a band compression technique, as is disclosed in, for example, "Digital compatible HD-TV Broadcast system", Woo Paik, IEEE Trans. on Broadcasting Vol. 36 No. 4 December 1990. The characterizing features of this technique will be described below.
As is shown in FIG. 1, a video signal input to an input terminal 11 is supplied to a subtracter 12 and a motion evaluation circuit 13. The subtracter 12 performs subtraction (to be described later), generating an output. The output of the subtracter 12 is input to a DCT (discrete cosine transformation) circuit 14. The DCT circuit 14 receives data in units of blocks, each consisting of 8 pixels in the horizontal direction.times.8 pixels in the vertical direction (8.times.8 pixels=64 pixels). It transforms a pixel array, from a time axis region to a frequency region, thereby obtaining coefficients. A quantizer 15 quantizes the coefficients. The quantizer 15 has 32 different quantization tables. It quantizes each coefficient in accordance with a selected one of the quantization tables. The quantization tables are arranged in the quantizer 15 in order that the generation and transmission amounts of information may fall within a predetermined range.
The coefficient data output from the quantizer 15 is zigzag-scanned, from a low-frequency region to a high-frequency region, in units of blocks. It is then input to a variable length encoder 16 to be converted into a variable length code constituted by the number of continuous zero coefficients (run length) and a non-zero coefficient, which form one pair of coefficients. The encoder 16 is a variable length encoder designed to change the code length in accordance with the frequency at which Huff man codes and the like occur. The variable-length-coded data is input to a FIFO (fast-in/fast-out) circuit 17 and is output therefrom at a predetermined rate. It is subsequently supplied through an output terminal 18 to a multiplexer (not shown) provided at the next stage and designed to multiplex a control signal, audio data, sync data (SYNC), NMP (to be described later), and the like). The data is then sent to a transmission path. The FIFO circuit 17 serves as a buffer for cancelling out the difference between the amount of codes generated and the amount of codes transmitted. This difference has been made since the output rate of the variable length encoder 16 is variable, whereas the transmission rate in the transmission path is fixed.
Then output from the quantizer 15 is input to an inverse quantizer 19. The quantizer 19 inversely quantizes the output of the quantizer 15, producing an output. The output of the reverse quantizer 19 is input to an inverse DCT circuit 20. The circuit 20 restores to the output to the original signal. The signal is input via an adder 21 to a frame delay circuit 22, the output of which is supplied to a motion compensation circuit 23 and the motion evaluation circuit 13.
The motion evaluation circuit 13 compares the input signal from the input terminal 11 with the output signal from the motion compensation circuit 23, thereby detecting the overall motion of a corresponding image and controlling the phase position of the signal output from the motion compensation circuit 23. If the image is a still image, compensation is performed to make the current image and an image one frame ahead thereof coincide with each other. The output from the motion compensation circuit 23 is supplied to the subtracter 12 through a switch 24, and is also fed back from the adder 21 to the frame delay circuit 22 through a switch 25.
The basic operation of the above system will be described below. The basic operation of the system includes intra-frame coding and inter-frame coding. Intra-frame coding is performed as follows. During this processing, both switches 24 and 25 are kept off. A video signal input to the input terminal 11 is transformed from a time axis region to a frequency region by the DCT circuit 14 and is quantized by the quantizer 15. The quantized signal is variable-length-coded and is output to the transmission path through the FIFO circuit 17. The quantized signal is restored to the original signal by the inverse quantizer 19 and the inverse DCT circuit 20 and is delayed by the frame delay circuit 22. That is, intra-frame coding is equivalent to processing of directly converting the information of an input video signal into a variable length code. This intra-frame coding is performed in an appropriate cycle, for example, for every scene change of an input video signal, or in units of predetermined blocks. Periodic intra-frame processing will be described later.
The inter-frame coding will now be described. To start this processing, both switches 24 and 25 are turned on. As a result, the subtracter 12 generates a difference signal representing the difference between an input video signal and a video signal one frame ahead thereof. This difference signal is input to the DCT circuit 14 and is thereby transformed from a time axis region to a frequency region. The signal is then quantized by the quantizer 15. The adder 21 adds the difference signal and the video signal, producing a sum signal. The sum signal is input to the frame delay circuit 22. The delay circuit 22 generates a predictive video signal predicting the input video signal from which to generated the difference signal. The predictive video signal is input to the motion compensation circuit 23.
FIGS. 2 shows line signals sent to the transmission path. These signals gave been obtained by performing, in the above-described manner, intra-frame coding and inter-frame coding on a video signal used as a high-definition television signal. Each line signal is on the transmission path. It has been obtained by multiplexing a control signal, an audio signal, a sync signal (SYNC), a system control signal, an NMP, and the like. Shown at (a) in FIG. 2 is the first line signal. Shown at (b) in FIG. 2 is one of other line signals subsequent to the first line signal.
If this video signal has been obtained by intra-frame coding, a proper video signal can be produced by performing inverse conversion on the video signal. If the video signal has undergone inter-frame coding, inverse conversion of the signal will reproduce a difference signal. Therefore, if a video signal (or a predictive video signal) reproduced one frame ahead the current frame is added to this difference signal, a proper video signal can be reproduced.
According to the above-described system, all information represented by a signal which has been subjected to intra-frame coding is put to variable-length coding, and signals subjected to inter-frame coding in the subsequent frames represent difference information, thus realizing band compression.
The sets of pixels to be processed by the band compression system will be defined below:
Block: A block is a 64-pixel area constituted by 8 pixels in the horizontal direction.times.8 pixels in the vertical direction. PA1 Super block: A super block is an area of a luminance signal constituted by 4 blocks in the horizontal direction and 2 blocks in the vertical direction. This area includes one block of a color difference signal U and one block of a color difference signal V. The image motion vectors obtained by the motion evaluation circuit 13 are set in units of super blocks. PA1 Macro-block: A macro-block is constituted by 11 super blocks in the horizontal direction. When codes are to be transmitted, DCT coefficients in a block are transformed into codes determined by the number of continuous zero coefficient and the amplitudes of non-zero coefficients and are transmitted in sets. An end-of-block signal is added to the end portion of each block. Motion vectors obtained by motion compensation in units of super blocks are added and transmitted in units of macro-blocks.
Features especially associated with the transmission signals shown in FIG. 2 will be described in more detail. The sync signal (SYNC) of the first line is identical to a frame sync signal stored in a decoder. All timing signals for the decoder are generated from one sync signal per frame. The NMP signal of the first line indicates the number of video data items, counted from the end of the first line signal to a macro-block of the next frame. Since codes are generated by means of adaptively switching intra-frame coding and inter-frame coding, the number of codes for each frame differs from that for any other frame, and the positions of codes vary. For this reason, the NMP signal indicates the positions of codes corresponding to one frame.
Periodical intra-frame processing is performed to cope with a case where a user changes a channel. In this band compression system, as described above, 11 super blocks in the horizontal direction constitute one macro-block, and 44 super blocks are arranged in one frame in the horizontal direction. That is, four macro-blocks exist in the horizontal direction, and 60 macro-blocks in the vertical direction. Hence, 240 macro-blocks, in total, are present in one frame. In the band compression system, as shown in FIG. 4, refreshing every vertical array of super blocks in units of 4 macro-blocks, and also refreshing all the super blocks are for a 11-frame period. That is, when the refreshed super blocks of 11 frames are accumulated, the intra-frame coding in all the areas comes to completion, as shown in FIG. 62(d). Thus, in the normal reproduction mode of, for example, a VTR (video tape recorder), the above-described intra-frame coding is carried out for a 11-frame period, reproduced images can be seen without problems.
Head data is inserted ahead each of the macro-blocks described above. This head data includes a collection of the motion vectors of the respective super blocks, field/frame determination data, PCM/DPCM determination data, quantization levels, and the like.
The above-described band compression system is used as an encoder for band compression of a television signal. At the receiving end, use is made of a decoder which corresponds to the encoder. Consider a case where the above-described transmission signal is recorded by a VTR. A general VTR employs a recording scheme in which a one-field video signal is converted into a fixed-length code to generate a predetermined amount of information. The information is recorded on X tracks (X is a positive integer).
In order to record and reproduce a transmission signal obtained by the band compression system, directly by means of the VTR, a variable length code must be as a code processed by intra-frame coding and inter-frame coding. In this case, the position at which to record a code periodically intra-frame-coded is not fixed. Therefore, blocks left refreshed are generated in the fast reproduction mode.
FIG. 5 shows track pattern which are formed when the signal, variable-length-coded in the above described manner, is recorded on a magnetic tape 26 in a helical direction. In track patterns T1 to T11, thick lines indicate positions where frames F1 to F11 are switched. The switching positions of the frames F1 to F11 are not aligned with each other are not aligned with one another. This is because the data recorded has not been prepared by variable length coding. Since all the track patterns T1 to T11 of the magnetic tape 26 are sequentially scanned by a magnetic head, a proper video signal can be reproduced, in the normal reproduction mode of the VTR, without problems by decoding the reproduction output using a decoder. In other words, in the normal reproduction mode, all the codes processed by intra-frame coding and inter-frame coding and recorded on the magnetic tape 26 can be reproduced so that a proper image can be constructed by using all the codes.
In the VTR, however, only limited tracks are reproduced in some cases, as in the case where the VTR is operated in a double-speed reproduction mode, i.e., a special reproduction mode. In the double-speed reproduction mode, the magnetic head jumps over tracks to pick up recorded signals. If the intra-frame-coded signals recorded on the tracks are sequentially reproduced, no problems will arise. If inter-frame-coded signals recorded on tracks are reproduced, however, images can be reproduced from difference signals only.
FIG. 6 show the traces X1 to X11 along which the magnetic head moves in the double-speed reproduction mode. As is shown in FIG. 6, the intra-frame-coded signals separately recorded on frames F1 to F24. The position of an intra-frame-coded portion reproduced within a frame is therefore indefinite. The intra-frame-coded signals which can be reproduced in the double-speed reproduction mode are shown at (a) to (h) in FIG. 7 and at (a) to (c) in FIG. 8. When the signals for 11 frames are accumulated, as shown at (d) in FIG. 8, there are portions in which no codes obtained by periodical intra-frame coding are present (that is, refreshed super blocks are not present), thus generating portions in which reproduced images cannot be constructed.